<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<html>
<head>
    <title>客户</title>
</head>
<body>
<div class="pageheader">
    <h2>客户编辑</h2>
</div>
<div class="contentpanel">
    <div class="panel panel-default">
        <form:form commandName="formDto" action="${contextPath}/admin/customer/edit" method="post"
                   cssClass="form-horizontal form-bordered">
            <input type="hidden" name="uuid" value="${formDto.uuid}"/>
            <div class="form-group">
                <label class="col-sm-3 control-label">姓名</label>

                <div class="col-sm-6">
                    <form:input path="name" cssClass="form-control" placeholder="客户姓名"/>
                    <form:errors path="name" cssClass="error text-danger"/>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label">电话</label>

                <div class="col-sm-6">
                    <form:input path="phone" cssClass="form-control" placeholder="电话号码"/>
                    <form:errors path="phone" cssClass="error text-danger"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">地址</label>

                <div class="col-sm-6">
                    <form:input path="address" cssClass="form-control" placeholder="地址"/>
                    <form:errors path="address" cssClass="error text-danger"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">物流公司</label>

                <div class="col-sm-6">
                    <form:input path="logistics" cssClass="form-control" placeholder="物流公司"/>
                    <form:errors path="logistics" cssClass="error text-danger"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">物流公司电话</label>

                <div class="col-sm-6">
                    <form:input path="logisticsPhone" cssClass="form-control" placeholder="物流公司电话"/>
                    <form:errors path="logisticsPhone" cssClass="error text-danger"/>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label"></label>

                <div class="col-sm-8">
                    <button type="submit" class="btn btn-primary">提交</button>
                    <a href="javascript:window.history.go(-1);" class="btn btn-default">取消</a>
                </div>
            </div>
        </form:form>
    </div>
</div>
<script type="text/javascript">
    <c:if test="${not empty param.edit}">
    jQuery.gritter.add({
        title: '新增/编辑 成功!',
        class_name: "growl-success",
        sticky: false
    });
    </c:if>
</script>
</body>
</html>